/* -----------------------------------------------------------------------
 * Name:   Krishan Kodali
 * Course: CS 362
 * Date:   01/26/14
 * cardtest2.c is to test village card in cardEffect funtion in dominion.c
 * -----------------------------------------------------------------------
 */

#include "dominion.h"
#include "dominion_helpers.h"
#include "rngs.h"
#include <string.h>
#include <stdio.h>
#include <assert.h>

int main () {
int numPlayer =2;
int seed = 1000;
int k[10] = {adventurer, council_room, feast, gardens, mine, remodel, smithy, village, baron, great_hall};

    int result = 0;
    int card = village;
    int bonus = 0;
    int expectedNumActions = 3;     //2 additional Actions - 1+2 =3 actiions
    int actualNumActions = 0;       // initialized
    struct gameState G;
    
     printf ("TESTING: cardEffect for village card -  cardTest2.c.\n");
 
    memset(&G, 23, sizeof(struct gameState));       // clear the game state
    result = initializeGame(numPlayer, k, seed, &G);
    
    cardEffect(card, 1, 1, 1, &G, 1, &bonus);
    actualNumActions = G.numActions;

    printf("actualNumActions for this turn = %d, expectedNumActions %d\n", actualNumActions, expectedNumActions);
    assert(expectedNumActions == actualNumActions);
    printf ("TEST OK - cardTest2.c.\n\n");
    return 0;
}

